Distributed bidirectional forwarding detection protocol (d-bfd) for cluster of interconnected switches

ABSTRACT

One embodiment of the present invention provides a switch which comprises one or more ports adapted to receive packets. The switch is a member of a network of interconnected switches, and also comprises a path monitoring apparatus adapted to: in response to a control packet associated with a session within a predetermined time interval, set a receive indicator for the switch to an active state; and in response to absence of the control packet associated with the session within the predetermined time interval, set the receive indicator for the switch to an inactive state. The path monitoring apparatus is also adapted to set a path state associated with the session based on the receive indicators for the switch and other member switches. The switch also comprises a broadcast apparatus adapted to broadcast at least the receive indicator for the switch to the other member switches.

RELATED APPLICATIONS

This application claims the benefit of:

U.S. Provisional Application No. 62/099,983, Attorney Docket Number BRCD-3318.0.1.US.PSP, titled “Distributed Bidirectional Forwarding Detection Protocol (D-BFD) For VCS Cluster,” by inventors Pavan Kumar, Prabu Thayalan, Shivalingayya Chikkamath, and Mythilikanth Raman, filed 5 Jan. 2015, the disclosure of which is incorporated by reference herein.

The present disclosure is related to:

U.S. patent application Ser. No. 13/087,239, Attorney Docket Number BRCD-3008.1.US.NP, titled “Virtual Cluster Switching,” by inventors Suresh Vobbilisetty and Dilip Chatwani, filed 14 Apr. 2011 (hereinafter U.S. patent application Ser. No. 13/087,239);

U.S. patent application Ser. No. 13/092,724, Attorney Docket Number BRCD-3010.1.US.NP, titled “Fabric Formation for Virtual Cluster Switching,” by inventors Shiv Haris and Phanidhar Koganti, filed 22 Apr. 2011 (hereinafter U.S. patent application Ser. No. 13/092,724”); and

U.S. Pat. No. 8,665,886, Attorney Docket No. BRCD-112-0439US, titled “Redundant Host Connection in a Routed Network,” by inventors Somesh Gupta, Anoop Ghanwani, Phanidhar Koganti, and Shunjia Yu, issued 4 Mar. 2014 (hereinafter “U.S. Pat. No. 8,665,886”),

the disclosures of which are incorporated by reference herein.

BACKGROUND

1. Field

The present disclosure relates to network management. More specifically, the present disclosure relates to a method and system for detecting a forwarding path failure based on a bidirectional forwarding detection (BFD) protocol in a distributed architecture.

2. Related Art

The exponential growth of the Internet has made it a popular delivery medium for multimedia applications, such as video on demand and television. Such applications have brought with them an increasing demand for bandwidth. As a result, equipment vendors race to build larger and faster switches with versatile capabilities, such as service insertion and provisioning, to move more traffic efficiently. However, the size of a switch cannot grow infinitely. It is limited by physical space, power consumption, and design complexity, to name a few factors. Furthermore, switches with higher capability are usually more complex and expensive. More importantly, because an overly large and complex system often does not provide economy of scale, simply increasing the size and capability of a switch may prove economically unviable due to the increased per-port cost.

A flexible way to improve the scalability of a switch system is to build a fabric switch. A fabric switch is a collection of individual member switches, e.g., a network of interconnected switches. These member switches form a single, logical switch that can have an arbitrary number of ports and an arbitrary topology. As demands grow, customers can adopt a “pay as you grow” approach to scale up the capacity of the fabric switch.

Meanwhile, layer-2 (e.g., Ethernet) switching technologies continue to evolve. More routing-like functionalities, which have traditionally been the characteristics of layer-3 (e.g., Internet Protocol or IP) networks, are migrating into layer-2. As Internet traffic is becoming more diverse, virtual computing in a network is becoming progressively more important as a value proposition for network architects. For example, a traditional bidirectional forwarding detection (BFD) protocol is a network protocol used to rapidly detect faults between adjacent forwarding engines, e.g., two forwarding engines connected by a link or two connected interfaces. A BFD session can be established between two endpoints that exchange BFD control packets over a particular link at a pre-negotiated interval. BFD is described in RFC 5880, “Bidirectional Forwarding Detection,” by D. Katz and D. Ward, June 2010, the entirety of which is hereby incorporated by reference. However, some issues remain unsolved when using BFD as a fault detection mechanism in a distributed architecture such as a fabric switch or a virtual cluster switch (VCS) cluster.

SUMMARY

One embodiment of the present invention provides a switch. The switch comprises one or more ports adapted to receive packets, wherein the switch is a member of a network of interconnected switches. The switch also comprises a path monitoring apparatus adapted to, in response to a control packet associated with a session within a predetermined time interval, set a receive indicator for the switch to an active state. The path monitoring apparatus is also adapted to, in response to absence of the control packet associated with the session within the predetermined time interval, set the receive indicator for the switch to an inactive state. The path monitoring apparatus is also adapted to set a path state associated with the session based on the receive indicators for the switch and one or more other member switches. The switch also comprises a broadcast apparatus adapted to broadcast at least the receive indicator for the switch to one or more other member switches.

In a variation on this embodiment, the path monitoring apparatus is further adapted to, in response to a notification message from another member switch that includes the receive indicator for the other member switch: store the receive indicator for the other switch; and set the path state based on the receive indicator for the other switch.

In a further variation, the path monitoring apparatus is further adapted to, in response to a notification message from another member switch that includes session parameters and a create command, create a session database based on the session parameters.

In a further variation, the switch further comprises a session database, which indicates parameters for the session and includes one or more of: a session identifier; a source address; a destination address; a master switch identifier; receive indicators for the switch and the other member switches; and the path state for the session.

In a further variation, the ports are adapted to receive packets based on one or more of: a virtual extensible local area network protocol; a generic routing encapsulation protocol; and a tunneling protocol based on encapsulation of a layer-2 compatible frame.

In a further variation, the broadcast apparatus is further adapted to broadcast based on an Internet Protocol.

In a further variation, the switch and the other member switches are each a virtual routing Bridge (RBridge) that belongs to the network of interconnected switches. A switch identifier for an RBridge is an RBridge identifier associated with a respective switch. The broadcast apparatus is further adapted to broadcast based on a Transparent Interconnection of Lots of Links protocol.

In a variation on this embodiment, the switch is designated as a master and further comprises a session initiator apparatus adapted to establish the session that corresponds to a path between the network of interconnected switches and a destination endpoint based on session parameters, wherein the session is based on a bidirectional forwarding detection protocol. The session initiator apparatus is also adapted to create the session database based on the session parameters. The broadcast apparatus is further adapted to broadcast the session parameters and a create command to the other member switches.

In a further variation on this embodiment, the switch comprises a forwarding apparatus adapted to construct a control packet that is destined for the destination endpoint. The path monitoring apparatus is further adapted to, in response to determining that the path state is inactive, initiate a tear down of the path.

In a further variation, the switch comprises a link tracking apparatus adapted to determine a status of all interfaces connecting to a next-hop core router. In response to determining that the status is down, the link tracking apparatus is adapted to initiate a failover to one of the other member switches and designate a new master. The broadcast apparatus is further adapted to broadcast a message to the other member switches to remove the switch from an active load balancing scheme.

In a further variation, the link tracking apparatus is further adapted to determine that the status of at least one of the interfaces is up. The broadcast apparatus is further adapted to broadcast a message to the other member switches to add the switch to the active load balancing scheme.

In a further variation, the link tracking apparatus is further adapted to determine that the master is unable to transmit a control packet. The path monitoring apparatus is further adapted to trigger a failover to one of the other member switches.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1A illustrates an exemplary environment comprising a fabric switch capable of monitoring the health of an extension tunnel in a distributed architecture, in accordance with an embodiment of the present invention.

FIG. 1B illustrates an exemplary environment comprising a fabric switch capable of monitoring the health of an extension tunnel in a distributed architecture, in accordance with an embodiment of the present invention.

FIG. 2A illustrates an exemplary environment and communication in a fabric switch capable of monitoring the health of an extension tunnel in a distributed architecture, in accordance with an embodiment of the present invention.

FIG. 2B illustrates exemplary database structures maintained by member switches of a fabric switch, corresponding to FIG. 2A, in accordance with an embodiment of the present invention.

FIG. 2C illustrates an exemplary environment and communication in a fabric switch capable of monitoring the health of an extension tunnel in a distributed architecture, in accordance with an embodiment of the present invention.

FIG. 2D illustrates exemplary database structures maintained by member switches of a fabric switch, corresponding to FIG. 2C, in accordance with an embodiment of the present invention.

FIG. 3 presents a flowchart illustrating a process of a designated master switch of a fabric switch monitoring the health of an extension tunnel, in accordance with an embodiment of the present invention.

FIG. 4A presents a flowchart illustrating a process of a member switch of a fabric switch receiving a notification message from another member switch, in accordance with an embodiment of the present invention.

FIG. 4B presents a flowchart illustrating a process of a member switch of a fabric switch receiving or not receiving a BFD control packet from a destination device within a predetermined time interval, in accordance with an embodiment of the present invention.

FIG. 5 presents a flowchart illustrating a process of a member switch of a fabric switch monitoring the health of an extension tunnel, in accordance with an embodiment of the present invention.

FIG. 6 presents a flowchart illustrating a process of a master switch for tracking links and initiating failover, in accordance with an embodiment of the present invention.

FIG. 7A presents a flowchart illustrating a process of a switch joining a fabric switch, in accordance with an embodiment of the present invention.

FIG. 7B presents a flowchart illustrating a process of a member switch leaving a fabric switch, in accordance with an embodiment of the present invention.

FIG. 8 illustrates an exemplary switch capable of monitoring the health of an extension tunnel in a distributed architecture, in accordance with an embodiment of the present invention.

In the figures, like reference numerals refer to the same figure elements.

DETAILED DESCRIPTION

The following description is presented to enable any person skilled in the art to make and use the invention, and is provided in the context of a particular application and its requirements. Various modifications to the disclosed embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the present invention. Thus, the present invention is not limited to the embodiments shown, but is to be accorded the widest scope consistent with the claims.

Overview

In embodiments of the present invention, the problem of monitoring the health of an extension tunnel in a distributed architecture (such as a fabric switch) based on BFD is solved by designating a master switch for a session, and allowing each member switch to synchronize and maintain its own session instance based on received BFD control packets. The master switch can establish a BFD session with a destination endpoint, broadcast session parameters to all other member switches, and transmit a BFD control packet at a predetermined interval to the destination endpoint. In a traditional point-to-point, non-distributed architecture, a single source node can establish a BFD session with a single destination endpoint. The source node sends a BFD control packet to a single destination node at a predetermined interval, and waits to receive (or not receive) the return BFD control packet, indicating an active (or inactive) path between the source and destination nodes. However, in a distributed architecture (such as a source fabric switch that includes multiple member switches), each member switch may need to establish individual BFD sessions with a single destination endpoint (or with multiple destination endpoints if the destination node is also a fabric switch) over each possible communication path. On a communication path, a destination endpoint can sit multiple hops away from the source fabric switch (e.g., on a data center core or a WAN), and member switches in a fabric switch can share a same virtual IP address. Thus, the number of established BFD sessions in a distributed architecture can grow exponentially with the number of virtual entity groups or virtual extensible local area network (VXLAN) tunnels configured with the same source virtual IP address.

Furthermore, because member switches of a fabric switch can share a virtual IP address and present a single logical switch view to the external network, a sending member switch can send a BFD control packet to a destination endpoint with a session identifier, which can be received by another (non-owner) member switch. The non-owner member switch can determine that the session identifier of the received BFD control packet does not match any session maintained by the non-owner switch, and the non-owner switch may discard the BFD control packet. The sending member switch, not having received the BFD control packet for the session, may falsely determine that the session is inactive, and initiate a tear down of the session even though a proper communication path exists via the non-owner member switch.

To address these inefficiencies, embodiments of the present invention provide a system that runs a BFD state machine on each member switch based on a forwarding path detection algorithm for BFD in a distributed architecture (herein referred to as a distributed bidirectional forwarding detection (D-BFD) protocol). The system designates a master switch (“BFD Master”) for a particular BFD session, while allowing the remaining member switches (“BFD Backups”) to act as backup switches for the same BFD session. The BFD Master can be elected based on parameters such as gateway priority configuration, number of active links, and/or next-hop reachability to the destination IP. Different BFD Masters can be elected for different sessions and can reside on any of the member switches. During operation, the BFD Master establishes a new BFD session with a destination endpoint using a unique session identifier for a pair of source and destination IP addresses. Before initiating the session, the BFD Master advertises parameters for the new session to all participating member switches in the D-BFD protocol, and all BFD Backups initialize a session instance based on the session parameters. The BFD Master then establishes a BFD session with the destination endpoint, and initializes its own session instance based on the session parameters.

The BFD Master sends a BFD control packet for the session at a predetermined time interval to the destination endpoint. Each member switch (e.g., the BFD Master and all BFD Backups) tracks reception of the return BFD control packet. Each member switch broadcasts a notification message to all other member switches upon receiving (or not receiving) the return BFD control packet within the predetermined time interval. Each member switch can update its own session instance by setting the state of a path (e.g., the particular BFD session) to an active or inactive state based on these notification messages. In this way, the BFD Master knows whether a particular BFD session is active or inactive, and can act accordingly. For example, if a BFD session is determined to be inactive, the BFD Master can initiate a tear down of the path. In some embodiments, the BFD Master can also track the status of interfaces connected to the BFD Master. If the status of all interfaces is determined to be down, the BFD Master can initiate a failover by designating a new master switch and notifying all other member switches of this event. Tracking links and initiating failover is described below in relation to FIG. 6.

It should be noted that a fabric switch is not the same as conventional switch stacking. In switch stacking, multiple switches are interconnected at a common location (often within the same rack), based on a particular topology, and manually configured in a particular way. These stacked switches typically share a common address, e.g., an IP address, so they can be addressed as a single switch externally. Furthermore, switch stacking requires a significant amount of manual configuration of the ports and inter-switch links. The need for manual configuration prohibits switch stacking from being a viable option in building a large-scale switching system. The topology restriction imposed by switch stacking also limits the number of switches that can be stacked. This is because it is very difficult, if not impossible, to design a stack topology that allows the overall switch bandwidth to scale adequately with the number of switch units.

In contrast, a fabric switch can include an arbitrary number of switches with individual addresses, can be based on an arbitrary topology, and does not require extensive manual configuration. The switches can reside in the same location, or be distributed over different locations. These features overcome the inherent limitations of switch stacking and make it possible to build a large “switch farm,” which can be treated as a single, logical switch. Due to the automatic configuration capabilities of the fabric switch, an individual physical switch can dynamically join or leave the fabric switch without disrupting services to the rest of the network.

Furthermore, the automatic and dynamic configurability of the fabric switch allows a network operator to build its switching system in a distributed and “pay-as-you-grow” fashion without sacrificing scalability. The fabric switch's ability to respond to changing network conditions makes it an ideal solution in a virtual computing environment, where network loads often change with time.

It should also be noted that a fabric switch is distinct from a virtual local area network (VLAN). A fabric switch can accommodate a plurality of VLANs. A VLAN is typically identified by a VLAN tag. In contrast, the fabric switch is identified by a fabric identifier (e.g., a cluster identifier), which is assigned to the fabric switch. A respective member switch of the fabric switch is associated with the fabric identifier. In some embodiments, a fabric switch identifier is pre-assigned to a member switch. As a result, when the switch joins a fabric switch, other member switches identify the switch to be a member switch of the fabric switch.

In this disclosure, the term “fabric switch” refers to a number of interconnected physical switches which form a single, scalable network of switches. The member switches of the fabric switch may operate as individual switches. The member switches of the fabric switch can also operate as a single, logical switch in the provision and control plane, the data plane, or both. Any new switch may join or leave the fabric switch in “plug-and-play” mode without any manual configuration. A fabric switch appears as a single, logical switch to an external device. “Fabric switch” should not be interpreted as limiting embodiments of the present invention to a plurality of switches operating as a single, logical switch. The term “fabric switch” can also refer to a network of interconnected switches. In some further embodiments, the fabric switch can be a Transparent Interconnection of Lots of Links (TRILL) network and a respective member of switch of the fabric switch is a TRILL routing bridge (RBridge). In some embodiments, the fabric switch can be a layer-3 (e.g., Internet Protocol or

IP) network and a member switch can be a layer-3 node (e.g., capable of routing based on a routing protocol).

Although the present disclosure is presented using examples based on an encapsulation protocol, embodiments of the present invention are not limited to networks defined using one particular encapsulation protocol associated with a particular Open System Interconnection Reference Model (OSI reference model) layer. For example, embodiments of the present invention can also be applied to a multi-protocol label switching (MPLS) network. In this disclosure, the term “encapsulation” is used in a generic sense, and can refer to encapsulation in any networking layer, sub-layer, or a combination of networking layers.

The term “end device” can refer to any device external to a network (e.g., does not perform forwarding in that network). Examples of an end device include, but are not limited to, a physical or virtual machine, a conventional layer-2 switch, a layer-3 router, or any other type of network device. Additionally, an end device can be coupled to other switches or hosts further away from a layer-2 or layer-3 network. An end device can also be an aggregation point for a number of network devices to enter the network. An end device hosting one or more virtual machines can be referred to as a host machine. In this disclosure, the terms “end device,” “endpoint,” and “host machine” are used interchangeably.

The term “VLAN” is used in a generic sense, and can refer to any virtualized network. Any virtualized network comprising a segment of physical networking devices, software network resources, and network functionality can be can be referred to as a “VLAN.” “VLAN” should not be interpreted as limiting embodiments of the present invention to layer-2 networks. “VLAN” can be replaced by other terminologies referring to a virtualized network or network segment, such as “Virtual Private Network (VPN),” “Virtual Private LAN Service (VPLS),” or “Easy Virtual Network (EVN).”

The term “packet” refers to a group of bits that can be transported together across a network. “Packet” should not be interpreted as limiting embodiments of the present invention to layer-3 networks. “Packet” can be replaced by other terminologies referring to a group of bits, such as “frame,” “cell,” or “datagram.”

The term “switch” is used in a generic sense, and can refer to any standalone or fabric switch operating in any network layer. “Switch” can be a physical device or software running on a computing device. “Switch” should not be interpreted as limiting embodiments of the present invention to layer-2 networks. Any device that can forward traffic to an external device or another switch can be referred to as a “switch.” Examples of a “switch” include, but are not limited to, a layer-2 switch, a layer-3 router, a TRILL RBridge, or a fabric switch comprising a plurality of similar or heterogeneous smaller physical switches.

The term “edge port” refers to a port on a network which exchanges data frames with a device outside of the network (i.e., an edge port is not used for exchanging data frames with another member switch of a network). The term “inter-switch port” refers to a port which sends/receives data frames among member switches of the network. A link between inter-switch ports is referred to as an “inter-switch link.” The terms “interface” and “port” are used interchangeably.

The term “RBridge” refers to routing bridges, which are bridges implementing the TRILL protocol as described in Internet Engineering Task Force (IETF) Request for Comments (RFC) “Routing Bridges (RBridges): Base Protocol Specification,” available at http://tools.ietf.org/html/rfc6325, which is incorporated by reference herein. Embodiments of the present invention are not limited to application among RBridges. Other types of switches, routers, and forwarders can also be used.

The term “switch identifier” refers to a group of bits that can be used to identify a switch. Examples of a switch identifier include, but are not limited to, a media access control (MAC) address, an Internet Protocol (IP) address, an RBridge identifier, or a combination thereof. In this disclosure, “switch identifier” is used as a generic term, is not limited to any bit format, and can refer to any format that can identify a switch. If the switch is an RBridge, the switch identifier can be an “RBridge identifier.” The TRILL standard uses “RBridge ID” to denote a 48-bit Intermediate-System-to-Intermediate-System (IS-IS) ID assigned to an RBridge, and “RBridge nickname” to denote a 16-bit value that serves as an abbreviation for the “RBridge ID.” The term “RBridge identifier” is used in a generic sense, is not limited to any bit format, and can refer to “RBridge ID,” “RBridge nickname,” or any other format that can identify an RBridge.

The terms “tunnel” or “extension tunnel” refer to a data communication where one or more networking protocols are encapsulated using another networking protocol. Although the present disclosure is presented using examples based on a layer-3 encapsulation of a layer-2 protocol, “tunnel” should not be interpreted as limiting embodiments of the present invention to layer-2 and layer-3 protocols. A “tunnel” can be established for and using any networking layer, sub-layer, or a combination of networking layers.

Network Architecture

FIG. 1A illustrates an exemplary environment 100 comprising a fabric switch capable of monitoring the health of an extension tunnel in a distributed architecture, in accordance with an embodiment of the present invention. Environment 100 can include fabric switches 110 and 140, which include member switches 111-115 and member switches 141-145, respectively. Some of member switches 111-115 can participate as switches in active gateways 119 (e.g., member switches 111, 112, and 113) and some of member switches 141-145 can participate in active gateways 149 (e.g., member switches 141-143).

Member switches in fabric switches 110 and 140 use edge ports to communicate with end devices and inter-switch ports to communicate with other member switches. For example, switch 114 is coupled to end devices 131 and 132 via an edge port, and to switch 115 via an inter-switch port. Switch 115 is coupled to an end device 133 via an edge port. Switches 111, 112 and 113 are coupled to end devices (e.g., routers) 122, 123, and 124, respectively, via edge ports. Routers 122, 123, and 124 can be coupled to an end device (e.g., a data center core router) 121, which can communicate over a network 102 with an end device (e.g., a data center core router) 151.

Communication between member switches via inter-switch ports can be based on IP. In some embodiments, fabric switches 110 and 140 are each a layer-3 (e.g., IP) network, switches 111-115 and switches 141-145 are layer-3 nodes, and data frames transmitted and received via inter-switch ports are encapsulated in IP headers. Communication between an end device and a member switch via an edge port can be based on Ethernet. For example, switch 115 can receive an Ethernet frame from end device 133 via an edge port. Switch 115 can encapsulate the Ethernet frame in an IP header (e.g., a layer-3 tunnel header) and forward the encapsulated packet to another member switch via an inter-switch port. It should be noted that the encapsulated packet can have an external Ethernet header for layer-2 forwarding. In some embodiments, fabric switches 110 and 140 are each a TRILL network, switches 111-115 and switches 141-145 are RBridges, and data frames transmitted and received via inter-switch ports are encapsulated in TRILL headers.

Member switches 141-143 can be coupled to router 151 via edge ports, whose corresponding links can be trunked in a virtual link aggregation group (VLAG) 152, as described in U.S. Pat. No. 8,665,886, titled “Redundant Host Connection in a Routed Network,” which is incorporated by reference herein. Examples of end devices 121-124, 131-133, 151, and 161-163 include, but are not limited to, a layer-2 switch, layer-3 router, top-of-the-rack switch, and physical or virtual host machine.

Environment 100 can include multiple virtual tunnels between fabric switches 110 and 140 through network 102. Network 102 can be a layer-3 network (e.g., an IP network). Fabric switches 110 and 140 can each act as a VXLAN tunnel endpoint in a VXLAN-based communication. As depicted in FIG. 1A, multiple communication paths exist between member switches in fabric switches 110 and 140. In addition, as possible tunnel endpoints, member switches participating in active gateways 119 and 149 (e.g., switches 111-113 and 141-143, respectively) can implement functionality for both a virtual router redundancy protocol extended (VRRP-E) and a VXLAN protocol. This allows participating member switches 111-113 and 141-143 to equalize traffic load to route packets to the next-hop IP. Furthermore, VXLAN-encapsulated packets sent to a destination IP can be received by any participating member switch in a respective active gateway.

FIG. 1B illustrates an exemplary environment 150 comprising a fabric switch capable of monitoring the health of an extension tunnel in a distributed architecture, in accordance with an embodiment of the present invention. Environment 150 can include fabric switches 110 and 140, which include member switches 111-115 and member switches 141-142, respectively. Member switches 111-113 can participate in active gateways 119 and member switches 141-142 can participate in active gateways 159. Switches 111, 112, and 113 are coupled, respectively, to routers 122, 123, and 124 and 125, and switches 141 and 142 are coupled, respectively, to routers 171 and 172. Routers 122-125 can communicate over network 102 via links 181-184, respectively. Links 181-184 form part of four separate equal-cost multi-path (ECMP) routing paths to destination end device 140 (assuming fabric switch 140 is an end device). Using a standard BFD protocol may require that each of member switches 111-113 establish individual BFD sessions over each possible communication path with destination end device 140. As the number of paths increases, so does the number of BFD sessions, which can result in efficient network behavior.

In addition, if member switch 111 sends the BFD control packet, but the return BFD control packet is received by member switch 112, member switch 112 may discard the packet as not matching any of its current sessions, and member switch 111 may inaccurately declare the session to be inactive and initiate a tear down of the session. Furthermore, running multiple sessions for the same destination may not work when multiple communication paths overlap (as in FIG. 1A, where the first-hop router is the same for all BFD sessions). Also, some devices may not be able to support multiple BFD sessions for the same pair of source and destination IP addresses because of the additional overhead involved in maintaining redundant sessions.

Embodiments of the present invention address these problems by designating a master switch and allowing all member switches to maintain and synchronize its own instance for a specific BFD session based on the communication and method described below in relation to FIGS. 2A-2D.

Exemplary Communication in a Distributed Architecture

FIG. 2A illustrates an exemplary environment 200 and communication in a fabric switch capable of monitoring the health of an extension tunnel in a distributed architecture, in accordance with an embodiment of the present invention. Environment 200 includes member switches 211, 212, and 213, which can be part of a fabric switch 210 (or a network 210 of interconnected switches). Switches 211-213 can communicate over a network 202 with end device 231 and 232. Switches 211, 212, and 213 maintain session databases 260, 270, and 280, respectively, which include parameters for multiple instances corresponding to BFD sessions. For example, switch 211 can maintain session database 260 which includes a session identifier field 261, a source IP address field 262, a destination IP address field 263, a master switch identifier field 264, a receive indicators field 265, and a path state 266.

During operation, switch 211 is elected as the BFD Master (“Master 211”). Switch 211 determines new session parameters, which can include, e.g., a session identifier, a desired or pre-negotiated transaction interval, a destination IP address, an initial state, a polling mechanism, a demand mode, and an echo receive interval. Master 211 broadcasts a notification message 250 that includes the session parameters and a “create” command to the other member switches (e.g., switches 212 and 213). Master 211 then establishes a BFD session that corresponds to the path between fabric switch 210 and destination endpoint 231. Master 211 also creates a session instance (e.g., session database 260) based on the session parameters (time T1). In FIG. 2A, Master 211 creates session database 260 with the following values: a session identifier with a value of “10”; a source IP address (e.g., a VIP 221) with a value of “10.10.10.10/24” which indicates the virtual IP address for fabric switch 210; a destination IP address (e.g., IP 241) with a value of “11.11.11.11/24” which indicates destination end device 231; a master switch identifier with a value of “211” which indicates Master 211; receive indicators for each of member switches 211-213, with initial values set to “0” to indicate an inactive receive state; and a path state with an initial value set to “0” to indicate an inactive path state.

FIG. 2B illustrates exemplary database structures maintained by member switches of a fabric switch, corresponding to FIG. 2A, in accordance with an embodiment of the present invention. Upon receiving notification message 250 (time T2), switches 212 and 213 each create a session instance based on the received session parameters and the create command (e.g., session databases 270 and 280, respectively), with the same values as session database 260 at time T1.

Master 211 then sends a BFD control packet (“BFD Tx”) 204 to destination end device 231 for session ID=10. Subsequently, switch 213 receives BFD control packet (“BFD Rx”) 206 from destination end device 231 for session ID=10 within the predetermined time interval. Switch 213 updates its local session database 280 by setting the receive indicator for switch 213 to an active state with a value of “1,” and further sets the path state to an active state with a value of “1” (time T3). Switch 213 then broadcasts a notification message 252 to the other member switches (e.g., switch 212 and Master 211) indicating the session ID and an active receive indicator for switch 213. Upon receiving message 252, Master 211 and switch 212 update their respective local session databases 260 and 270 by setting the receive indicator for switch 213 to an active state with a value of “1,” and further set the path state to an active state with a value of “1” (time T4). Because at least one forwarding path to the destination exists (e.g., the path from Master 211 to destination end device 231 to switch 213), the D-BFD session for session ID=10 is determined to be active. For example, if at least one of receive indicators 265 in session database 260 is active or set to a value of “1,” Master 211 determines that the D-BFD session for the corresponding path is active. Note that if Master 211 receives BFD Rx 206, the system acts in similar fashion, with Master 211 setting its own receive indicator to active and updating its path state in its local session database, and subsequently broadcasting a notification message to the other member switches indicating its receive indicator as active, thus allowing all member switches to maintain and synchronize their own local session databases.

A session is determined to be down or inactive only if the state of the D-BFD session is determined to be down or inactive on all member switches. For example, if all of receive indicators 265 in session database 260 are inactive or set to a value of “0,” Master 211 determines that the D-BFD session for the corresponding path is inactive and can initiate a tear down of the path. FIG. 2C illustrates an exemplary environment 290 and communication in a fabric switch capable of monitoring the health of an extension tunnel in a distributed architecture, in accordance with an embodiment of the present invention. At time T4 (as depicted in FIGS. 2A-2C), all member switches of fabric switch 210 (e.g., Master 211 and switches 212 and 213) determine that the path state for BFD session ID=10 is active (e.g., “1”), as reflected in each of session databases 260, 270, and 280.

FIG. 2D illustrates exemplary database structures maintained by member switches of a fabric switch, corresponding to FIG. 2C, in accordance with an embodiment of the present invention. At the end of the predetermined time interval, Master 211 can send a BFD Tx 208 to destination end device 231 for session ID=10. In some embodiments, Master 211 does not need to broadcast a notification message for subsequent BFD transmit control packets because each member switch creates and maintains an instance of the session database for the corresponding session ID in a previous operation. If switch 213 does not receive a BFD Rx from destination device 231 within the predetermined time interval, switch 213 updates its local session database 280 by setting the receive indicator for switch 213 to an inactive state with a value of “0,” and further sets the path state to an inactive state with a value of “0” (time T5). Switch 213 then broadcasts a message 256 to the other member switches (e.g., Master 211 and switch 212) indicating the session ID and an inactive receive indicator for switch 213. Upon receiving message 256, Master 211 and switch 212 update their respective local session databases 260 and 270 by setting the receive indicator for switch 213 to an inactive state with a value of “0,” and further set the path state to an inactive state with a value of “0” (time T6). Subsequently, Master 211 determines that the D-BFD session for session ID=10 is down and Master 211 can initiate a teardown of the D-BFD session.

Role of Master/Initiator D-BFD Switch

FIG. 3 presents a flowchart illustrating a process of a designated master switch of a fabric switch monitoring the health of an extension tunnel, in accordance with an embodiment of the present invention. During operation, the master switch advertises new session parameters to all other member switches of the fabric switch (operation 302). As described above, the session parameters can include, e.g., a session identifier, a desired or pre-negotiated transaction interval, a destination IP address, an initial state, a polling mechanism, a demand mode, and an echo receive interval. The master switch initiates a BFD session with a destination device based on the new session parameters (operation 304). The source IP address used to establish the session can be a virtual IP address of the master switch, and can be shared by all member switches of the fabric switch. The master switch transmits a BFD control packet to the destination device (operation 306), which can occur at the desired or pre-negotiated transaction interval. Subsequently, the master switch can receive a notification message from another member switch (operation 308), and the operation continues as depicted by Label A, described below in relation to FIG. 4A. Alternatively, the master switch can receive (or not receive) the return BFD control packet from the destination device (operation 310), and the operation continues as depicted by Label B, described below in relation to FIG. 4B.

Returning from the operations depicted by Labels A and B, respectively, in FIGS. 4A and 4B below, the master determines if the current path state is active (decision 316). If the path state as indicated in the local session database maintained by the master switch is active (e.g., state 266 of session database 260 of FIG. 2A indicates a value of “1” at time T4), the operation returns. If the path state is inactive (e.g., state 266 of session database 260 of FIG. 2C indicates a value of “0” at time T6), the master switch initiates a teardown of the corresponding BFD session (operation 318).

Member Switch Receives Notification Message and/or BFD Control Packet

FIG. 4A presents a flowchart illustrating a process of a member switch of a fabric switch receiving a notification message from another member switch, in accordance with an embodiment of the present invention. During operation, a member switch (“receiving member switch”) receives a notification message from another member switch, where the notification message contains the receive status (“receive indicator”) of the other member switch for an established BFD session (operation 402). The receiving member switch can be the designated master switch or any other member switch of the fabric switch. The receiving member switch updates its local session database by storing the receive indicator (e.g., indicating a value of active or inactive) of the other member switch (operation 404). The receiving member switch also updates its local session database by setting the path state based on the receive indicator of the other member switch and the receive indicators of all other member switches (operation 406). If the receive indicator of any member switch is active, the corresponding BFD session is active or up. If the receive indicator of all member switches is inactive, the BFD session is inactive or down.

FIG. 4B presents a flowchart illustrating a process of a member switch of a fabric switch receiving or not receiving a BFD control packet from a destination device within a predetermined time interval, in accordance with an embodiment of the present invention. During operation, a member switch determines whether it receives a BFD control packet (decision 452). If the member switch does not receive a BFD control packet, the member switch determines whether the current time is within the predetermined time interval or before expiration of the time interval (decision 454). If the current time is before the expiration of the time interval (e.g., within the time interval), the operation returns to operation 452. If the current time is not before the expiration of the time interval (e.g., after the expiration of the time interval), the member switch updates its local session database by setting its own receive status to inactive or “0” (operation 458).

If the member switch does receive a BFD control packet (decision 452), the member switch determines whether the current time is within the predetermined time interval or before expiration of the time interval (decision 456). If the current time is before the expiration of the time interval (e.g., within the time interval), the member switch updates its local session database by setting its own receive status to active or “1” (operation 460). If the current time is not before the expiration of the time interval (e.g., after the expiration of the time interval), the member switch updates its local session database by setting its own receive status to inactive or “0” (operation 458).

Subsequently, the member switch updates the local session database by setting the current path state based on the receive indicators of all member switches (operation 462). The member switch also broadcasts a notification message to all other member switches, where the notification message contains the receive indicator or receive status of the local switch (operation 464).

Role of Master/Initiator D-BFD Switch

FIG. 5 presents a flowchart illustrating a process of a member switch of a fabric switch monitoring the health of an extension tunnel, in accordance with an embodiment of the present invention. During operation, a member switch (“receiving member switch”) receives new session parameters from a master switch (operation 502). In some embodiments, the member switch can receive a “create” command from the master switch in conjunction with the new session parameters. The member switch then creates a session database (e.g., instantiates a session instance) based on the new session parameters (operation 504). Subsequently, the member switch can receive a notification message from another member switch (operation 506), and the operation continues as depicted by Label A, described above in relation to FIG. 4A. Alternatively, the member switch can receive (or not receive) the return BFD control packet from the destination device (operation 508), and the operation continues as depicted by Label B, described above in relation to FIG. 4B.

Tracking Links and Initiating Failover

FIG. 6 presents a flowchart illustrating a process of a master switch for tracking links and initiating failover, in accordance with an embodiment of the present invention. During operation, the “original” master switch determines if all interfaces connecting to the fabric switch are down (decision 602). If all interfaces are not down (e.g., there is at least one interface available and active to carry data between the fabric switch and the destination device), the system returns to operation 602. If all interfaces are down, the original master switch initiates a BFD session failover to another member switch (e.g., a member switch participating in the same active gateway) (operation 604).

The original master switch can remove itself from an active load balancing scheme by broadcasting a notification message to all other member switches, where the notification message contains information indicating that the administrator is down (e.g., “admin_down”) (operation 606). The system elects a “new” master switch that has favorable link parameters. In some embodiments, the system uses the same parameters to elect the new master switch as it does to initially elect the original master switch. The original master switch then transfers master status to the new master switch (operation 608). The new master switch can thus continue transmission of the BFD control packets, providing a seamless transition in the event of link failure.

If the original link parameters become favorable (e.g., the system determines that the interfaces connecting from the original master switch to the fabric switch are up or otherwise determined to be favorable) (decision 610), the system can re-transfer master status by allowing the original master switch to re-assume master status (operation 612). The original master switch broadcasts a notification message to all other member switches, where the notification message contains information indicating that the administrator is up (e.g., “admin_up”) (operation 614). Member switches participating in active gateways can send “admin_down” and “admin_up” messages to aid in tracking links.

New Switch Joins or Leaves a Fabric Switch

FIG. 7A presents a flowchart illustrating a process of a switch joining a fabric switch, in accordance with an embodiment of the present invention. During operation, a new switch joins a fabric switch (or a network of interconnected switches) (operation 702). The new switch requests forwarding path information from all member switches participating in the BFD protocol for existing sessions (operation 704). The new switch then receives current state information from all participating member switches for all sessions maintained by each participating member switch (operation 706). The current state information can include one or more of: negotiated and configured BFD session parameters; an indicator of an active or inactive session state (e.g., path state); and information regarding the current BFD Master for a particular session. The new switch instantiates a BFD session based on the state information received from the participating member switches (operation 708). Subsequently, the new switch begins advertising its BFD session state to the other participating member switches (operation 710).

FIG. 7B presents a flowchart illustrating a process of a member switch leaving a fabric switch, in accordance with an embodiment of the present invention. During operation, the fabric switch (or network of interconnected switches) detects the failure or loss of an inter-switch link to a member switch (operation 752). The fabric switch generates a notification message and broadcasts the notification to all other member switches, where the notification message contains information indicating the failure (e.g., “domain_unreachable”) (operation 754). The other member switches receive the domain_unreachable notification message for the lost member switch, and clear the entry for the lost node in their respective forwarding information databases (operation 756).

Exemplary Switch

FIG. 8 illustrates an exemplary switch capable of monitoring the health of an extension tunnel in a distributed architecture, in accordance with an embodiment of the present invention. In this example, a switch 800 includes a number of communication ports 802, a path monitoring module 820, a session initiator module 822, a broadcast module 824, a forwarding module 826, a link tracking module 828, and a storage 850. In some embodiments, switch 800 may maintain a membership in a fabric switch, wherein switch 800 also includes a fabric switch management module 840. Fabric switch management module 840 maintains a configuration database in storage 850 that maintains the configuration state of a respective switch within the fabric switch. Fabric switch management module 840 maintains the state of the fabric switch, which is used to join other switches. Under such a scenario, communication ports 802 can include inter-switch communication channels for communication within a fabric switch. This inter-switch communication channel can be implemented via a regular communication port and based on any open or proprietary format. Each of modules 820, 822, 824, 826, 828, and 840 can be implemented as an apparatus.

During operation, path monitoring module 820 operates to receive a control packet associated with a session within a predetermined time interval via one of communication ports 802. In response to receiving the control packet within the time interval, path monitoring module 820 is adapted to set a receive indicator for the switch to an active state, and in response to not receiving the control packet within the time interval, path monitoring module 820 is adapted to set the receive indicator for the switch to an inactive state. Path monitoring module 820 is also adapted to set a path state associated with the session based on the receive indicators for the switch and the one or more other member switches. Broadcast module 824 is adapted to broadcast at least the receive indicator for the switch to one or more other member switches.

Path monitoring module 820 is further adapted to, in response to receiving a notification message from another member switch that includes the receive indicator of the other member switch: store the receive indicator of the other switch; and set the path state based on the receive indicator for the other switch. Path monitoring module 820 is further adapted to, in response to receiving a notification message from another member switch that includes session parameters and a create command, create a session database based on the session parameters.

In some embodiments, switch 800 is designated as a master switch. Session initiator module 822 is adapted to establish the session that corresponds to a path between the network of interconnected switches and a destination endpoint based on session parameters, wherein the session is based on a bidirectional forwarding detection (BFD) protocol. Session initiator module 822 is also adapted to create the session database based on the session parameters. Broadcast module 824 is further adapted to broadcast the session parameters and a create command to the other member switches. Forwarding module 826 is adapted to construct a control packet that is destined for the destination endpoint. Path monitoring module 820 is further adapted to, in response to determining that the path state is inactive, initiate a tear down of the path. Link tracking module 828 is adapted to determine a status of all interfaces connecting to a next-hop core router. In response to determining that the status is down, link tracking module 828 is adapted to initiate a failover to one of the other member switches and designate a new master. Broadcast module 824 is further adapted to broadcast a message to the other member switches to remove the switch from an active load balancing scheme. Link tracking module 828 is further adapted to determine that the status of at least one of the interfaces is up. Broadcast module 824 is further adapted to broadcast a message to the other member switches to add the switch to an active load balancing scheme.

Storage 850 can store a session database which indicates parameters for the session and includes one or more of: a session identifier; a source address; a destination address; a master switch identifier; receive indicators for the switch and the other member switches; and the path state for the session.

Note that the above-mentioned modules can be implemented in hardware as well as in software. In one embodiment, these modules can be embodied in computer-executable instructions stored in a memory which is coupled to one or more processors in switch 800. When executed, these instructions cause the processor(s) to perform the aforementioned functions.

In summary, embodiments of the present invention provide a switch, method, and computer system for monitoring the health of an extension tunnel. In one embodiment, the switch includes a path monitoring apparatus and a broadcast apparatus. During operation, the path monitoring apparatus, via the switch, in response to a control packet or absence of the control packet within a predetermined time interval, sets a receive indicator for the switch to an active or inactive state, and sets a path state associated with the session based on the receive indicators for the switch and one or more other member switches. The broadcast apparatus broadcasts at least the receive indicator for the switch to one or more other member switches. In another embodiment, the path monitoring apparatus, in response to a notification message from another member switch that includes the receive indicator for the other switch, stores the receive indicator for the other switch and sets the path state based on the receive indicator for the other switch. In another embodiment, the switch is designated as a master and performs the operations described herein. Thus, the switch facilitates monitoring the health of an extension tunnel in a distributed architecture by allowing each member switch to maintain its own synchronized version of a session database, and allowing the designated master switch to determine an appropriate action based on a path state for a particular BFD session.

The methods and processes described herein can be embodied as code and/or data, which can be stored in a computer-readable non-transitory storage medium. When a computer system reads and executes the code and/or data stored on the computer-readable non-transitory storage medium, the computer system performs the methods and processes embodied as data structures and code and stored within the medium.

The methods and processes described herein can be executed by and/or included in hardware modules or apparatus. These modules or apparatus may include, but are not limited to, an application-specific integrated circuit (ASIC) chip, a field-programmable gate array (FPGA), a dedicated or shared processor that executes a particular software module or a piece of code at a particular time, and/or other programmable-logic devices now known or later developed. When the hardware modules or apparatus are activated, they perform the methods and processes included within them.

The foregoing descriptions of embodiments of the present invention have been presented only for purposes of illustration and description. They are not intended to be exhaustive or to limit this disclosure. Accordingly, many modifications and variations will be apparent to practitioners skilled in the art. The scope of the present invention is defined by the appended claims. 

What is claimed is:
 1. A switch, comprising: one or more ports adapted to receive packets, wherein the switch is a member of a network of interconnected switches; a path monitoring apparatus adapted to: in response to a control packet associated with a session within a predetermined time interval, set a receive indicator for the switch to an active state; in response to absence of the control packet associated with the session within the predetermined time interval, set the receive indicator for the switch to an inactive state; and set a path state associated with the session based on the receive indicators for the switch and one or more other member switches; and a broadcast apparatus adapted to broadcast at least the receive indicator for the switch to one or more other member switches.
 2. The switch of claim 1, wherein the path monitoring apparatus is further adapted to: in response to receiving a notification message from another member switch that includes the receive indicator for the other member switch: store the receive indicator for the other switch; and set the path state based on the receive indicator for the other switch.
 3. The switch of claim 1, wherein the path monitoring apparatus is further adapted to: in response to a notification message from another member switch that includes session parameters and a create command, create a session database based on the session parameters.
 4. The switch of claim 1, further comprising a session database, which indicates parameters for the session and includes one or more of: a session identifier; a source address; a destination address; a master switch identifier; receive indicators for the switch and the other member switches; and the path state for the session.
 5. The switch of claim 1, wherein the ports are adapted to receive packets based on one or more of: a virtual extensible local area network protocol; a generic routing encapsulation protocol; and a tunneling protocol based on encapsulation of a layer-2 compatible frame.
 6. The switch of claim 1, wherein the broadcast apparatus is further adapted to broadcast based on an Internet Protocol.
 7. The switch of claim 1, wherein the switch and the other member switches are each a virtual routing Bridge (RBridge) that belongs to the network of interconnected switches; wherein a switch identifier for an RBridge is an RBridge identifier associated with a respective switch; and wherein the broadcast apparatus is further adapted to broadcast based on a Transparent Interconnection of Lots of Links protocol.
 8. The switch of claim 1, wherein the switch is designated as a master, and further comprises a session initiator apparatus adapted to: establish the session that corresponds to a path between the network of interconnected switches and a destination endpoint based on session parameters, wherein the session is based on a bidirectional forwarding detection protocol; and create the session database based on the session parameters; and wherein the broadcast apparatus is further adapted to broadcast the session parameters and a create command to the other member switches.
 9. The switch of claim 8, further comprising: a forwarding apparatus adapted to construct a control packet that is destined for the destination endpoint; and wherein the path monitoring apparatus is further adapted to, in response to determining that the path state is inactive, initiate a tear down of the path.
 10. The switch of claim 8, further comprising: a link tracking apparatus adapted to: determine a status of all interfaces connecting to a next-hop core router; and in response to determining that the status is down: initiate a failover to one of the other member switches; and designate a new master; and wherein the broadcast apparatus is further adapted to broadcast a message to the other member switches to remove the switch from an active load balancing scheme.
 11. The switch of claim 10, wherein the link tracking apparatus is further adapted to: determine that the status of at least one of the interfaces is up; and wherein the broadcast apparatus is further adapted to broadcast a message to the other member switches to add the switch to the active load balancing scheme.
 12. The switch of claim 10, wherein the link tracking apparatus is further adapted to: determine that the master is unable to transmit a control packet; and wherein the path monitoring apparatus is further adapted to trigger a failover to one of the other member switches.
 13. A computer-implemented method, comprising: in response to a control packet associated with a session within a predetermined time interval, setting a receive indicator for a switch to an active state, wherein the switch is a member of a network of interconnected switches, and wherein the switch comprises one or more ports adapted to receive packets; in response to absence of the control packet associated with the session within the predetermined time interval, setting the receive indicator for the switch to an inactive state; setting a path state associated with the session based on the receive indicators for the switch and one or more other member switches; and broadcasting at least the receive indicator for the switch to one or more other member switches.
 14. The method of claim 13, further comprising: in response to a notification message from another member switch that includes the receive indicator for the other member switch: storing the receive indicator for the other switch; and setting the path state based on the receive indicator for the other switch.
 15. The method of claim 13, further comprising: in response to a notification message from another member switch that includes session parameters and a create command, creating a session database based on the session parameters.
 16. The method of claim 13, further comprising a session database, which indicates parameters for the session and includes one or more of: a session identifier; a source address; a destination address; a master switch identifier; receive indicators for the switch and the other member switches; and the path state for the session.
 17. The method of claim 13, wherein the ports are adapted to receive packets based on one or more of: a virtual extensible local area network protocol; a generic routing encapsulation protocol; and a tunneling protocol based on encapsulation of a layer-2 compatible frame.
 18. The method of claim 13, wherein broadcasting to one or more other member switches is based on an Internet Protocol.
 19. The method of claim 13, wherein the switch and the other member switches are each a virtual routing Bridge (RBridge) that belongs to the network of interconnected switches; wherein a switch identifier for an RBridge is an RBridge identifier associated with a respective switch; and wherein the method further comprises broadcasting based on a Transparent Interconnection of Lots of Links protocol.
 20. The method of claim 13, wherein the switch is designated as a master, further comprising: establishing the session that corresponds to a path between the network of interconnected switches and a destination endpoint based on session parameters, wherein the session is based on a bidirectional forwarding detection protocol; creating the session database based on the session parameters; and broadcasting the session parameters and a create command to the other member switches.
 21. The method of claim 20, further comprising: constructing a control packet that is destined for the destination endpoint; and in response to determining that the path state is inactive, initiating a tear down of the path.
 22. The method of claim 20, further comprising: determining a status of all interfaces connecting to a next-hop core router; in response to determining that the status is down: initiating a failover to one of the other member switches; and designating a new master; and broadcasting a message to the other member switches to remove the switch from an active load balancing scheme.
 23. The method of claim 22, further comprising: determining that the status of at least one of the interfaces is up; and broadcasting a message to the other member switches to add the switch to an active load balancing scheme.
 24. The method of claim 22, further comprising: determining that the master is unable to transmit a control packet; and triggering a failover to one of the other member switches.
 25. A computer system for monitoring path health, the system comprising: a processor; and a storage device coupled to the processor and storing instructions that when executed by a computer cause the computer to perform a method, the method comprising: in response to a control packet associated with a session within a predetermined time interval, setting a receive indicator for a switch to an active state, wherein the switch is a member of a network of interconnected switches; in response to absence of the control packet associated with the session within the predetermined time interval, setting the receive indicator for the switch to an inactive state; setting a path state associated with the session based on the receive indicators for the switch and one or more other member switches; and broadcasting at least the receive indicator for the switch to one or more other member switches. 